package com.zerocarbon.framework.common.result.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 用户token展示对象
 * @author wyf  2020年5月31日
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class AuthTokenVO implements Serializable {

	private static final long serialVersionUID = 1L;
	
	private String tokenUuid;						//tokenId
	
	private String accessToken;  					//用户token，即是接口文档中{JWT_TOKEN}，30分过期
    
    private String tokenType;   					//令牌类型
	
	private String headerPrefix;					//token的header头请求前缀 当前仅有Bearer
    
    private long expiresIn;							//acess_token 过期时间(秒)
    
    private Date expiration;						//acess_token 过期日期
    
    private String refreshToken; 					//刷新token，可以凭此token刷新access_token，30天过期
    
    private long refreshExpiresIn;					//refresh_token 过期时间(秒)
    
    private Date refreshExpiration; 				//refresh_token 过期日期

    private Long accountId;
    private Long userId;
    private String userMobile;
    private String userName;
    private Integer userIdentity;
    private Long companyId;
    private String companyName;
    private List<Long> roleIds;
    private List<Long> permIds;
    private Long tenantId;
}
